Skip to content

Merge reference #1497

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed

Merge reference #1497

wants to merge 2 commits into from

Conversation

DavideD
Copy link
Member

@DavideD DavideD commented Mar 11, 2023

This is an unusual use case where the association is with an entity
column instead of the identifier. It's a specific case and the current
mapping, as it is, fails using regular Hibernate ORM anyway.

I've added a test with the persist that seems to work as expected.

DavideD added 2 commits March 11, 2023 14:06
This is an unusual use case where the association is with an entity
column instead of the identifier. It's a specific case and the current
mapping, as it is, fails using regular Hibernate ORM anyway.

I've added a test with the persist that seems to work as expected.
Extract copyEntity method from the existing code
@DavideD
Copy link
Member Author

DavideD commented Mar 11, 2023

Closing this for now

@DavideD DavideD closed this Mar 11, 2023
@gavinking
Copy link
Member

gavinking commented Mar 11, 2023

This is an unusual use case where the association is with an entity column instead of the identifier.

Well, it's unusual, yes, but it's something we're definitely supposed to support.

the current mapping, as it is, fails using regular Hibernate ORM anyway.

That surprises me. What is the error? I believe it should work and if it doesn't, then it would be a bug in H6.

@DavideD
Copy link
Member Author

DavideD commented Mar 11, 2023

Let me rewrite the test for ORM

@DavideD
Copy link
Member Author

DavideD commented Mar 11, 2023

Here's the test for ORM: DavideD/hibernate-orm@a4b4448

Error:

org.hibernate.AssertionFailure: non-transient entity has a null id: org.hibernate.orm.test.embeddable.MergeWithReferenceTest$Bar$HibernateProxy$2WSQf5sQ

Same as the Hibernate Reactive one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants